package 代码随想录_补充题目.字符串反转系列;

/**
 * @author zx
 * @create 2023-02-08 22:56
 */
public class 反转字符串_344 {
    public void reverseString(char[] s) {
        int left = 0,right = s.length - 1;
        while(left < right){
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
